From 19bcd321c5bc5e0f621c89e01309070d86ccbaac Mon Sep 17 00:00:00 2001 From: Ewan Mellor Date: Tue, 6 Feb 2007 15:37:11 +0000 Subject: [PATCH] Fix XendLogging to work on Python 2.4.0 and 2.4.1 (the logging library interface changed with 2.4.2, not 2.4.0). Signed-off-by: Qing He --- tools/python/xen/xend/XendLogging.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/python/xen/xend/XendLogging.py b/tools/python/xen/xend/XendLogging.py index e889449fd0..6d6140188d 100644 --- a/tools/python/xen/xend/XendLogging.py +++ b/tools/python/xen/xend/XendLogging.py @@ -52,8 +52,8 @@ if 'TRACE' not in logging.__dict__: for frame in frames: filename = os.path.normcase(frame[1]) if filename != thisfile and filename != logging._srcfile: - major, minor, _, _, _ = sys.version_info - if major == 2 and minor >= 4: + major, minor, micro, _, _ = sys.version_info + if (major, minor, micro) >= (2, 4, 2): return filename, frame[2], frame[3] else: return filename, frame[2] -- 2.30.2